package io.renren.modules.gengyun.controller;

import io.renren.modules.gengyun.service.PlanGatherService;
import io.renren.modules.gengyun.service.PlanGatherTimeService;
import io.renren.modules.gengyun.service.PlanTimeIndexService;
import io.renren.modules.gengyun.utils.ResultUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("gengyun/GatherPlan")
public class PlanGatherController {
    @Autowired
    private PlanGatherService planGatherService;
    @Autowired
    private PlanTimeIndexService planTimeIndexService;
    @Autowired
    private PlanGatherTimeService planGatherTimeService;
    @Autowired


    @RequestMapping(value="/allList", method = RequestMethod.POST)
    public Map<String,Object> find() throws IOException {
        System.out.println("grngyun plan 进入");
        List<Map<String,Object>> plan_all = planGatherService.allplan();
        Map<String,Object> resultMap = ResultUtils.getResponse(plan_all,"succeed",
                "internal error",false);
        return resultMap;
    }





}
